(delphi-fill-comment): Use save-restriction.
authorEli Zaretskii <eliz@gnu.org>
Sat, 22 Jul 2006 11:08:02 +0000 (11:08 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 22 Jul 2006 11:08:02 +0000 (11:08 +0000)
lisp/progmodes/delphi.el

index 03ab24adf47a03bcaed755b86fef0d78b810bded..44a192ab772bb587dd64bedc2ad579c49941d243 100644 (file)
@@ -1767,6 +1767,7 @@ it is a routine."
 An error is raised if not in a comment."
   (interactive)
   (save-excursion
+    (save-restriction
     (let* ((comment (delphi-current-token))
            (comment-kind (delphi-token-kind comment)))
       (if (not (delphi-is comment-kind delphi-comments))
@@ -1845,7 +1846,7 @@ An error is raised if not in a comment."
           ;; React to the entire fill change as a whole.
           (delphi-progress-start)
           (delphi-parse-region comment-start comment-end)
-          (delphi-progress-done))))))
+            (delphi-progress-done)))))))
 
 (defun delphi-new-comment-line ()
   "If in a // comment, does a newline, indented such that one is still in the